* lread.c: Fix file descriptor leaks and errno issues.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 17 Jul 2013 17:24:54 +0000 (10:24 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 17 Jul 2013 17:24:54 +0000 (10:24 -0700)
commitd3805d6be0d8da85e5e778314581af121e2f3d4c
tree252765077c2d0212882e90dc55dbdabc181e0d25
parent4a66e7fa30af84fd544be2c6fa618188549aaa8b
* lread.c: Fix file descriptor leaks and errno issues.

(Fload): Close some races that leaked fds or streams when 'load'
was interrupted.
(Fload, openp): Report error number of last nontrivial failure to open.
ENOENT counts as trivial.
* eval.c (do_nothing, clear_unwind_protect, set_unwind_protect_ptr):
New functions.
* fileio.c (close_file_unwind): No need to test whether FD is nonnegative,
now that the function is always called with a nonnegative arg.
* lisp.h (set_unwind_protect_ptr, set_unwind_protect_int): Remove.
All uses replaced with ...
(clear_unwind_protect, set_unwind_protect_ptr): New decls.
src/ChangeLog
src/editfns.c
src/eval.c
src/fileio.c
src/lisp.h
src/lread.c